package cn.itsource.basic.service;

import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.query.BaseQuery;
import cn.itsource.basic.util.PageList;

import java.util.List;

/**
 * 公共的service
 */
public interface IBaseService<T extends BaseDomain,Q extends BaseQuery> {

    T findOne(Long id);

    List<T> findAll();

    void saveOrUpdate(T t);

    void delete(Long id);

    PageList<T> findPage(Q q);

    void batchDelete(Long[] ids);

}
